package com.pet.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pet.server.domain.entity.Employee;
import com.pet.server.mapper.EmployeeMapper;
import com.pet.server.service.IEmployeeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class EmployeeServiceImpl implements IEmployeeService {
  private final EmployeeMapper employeeMapper;

  @Override
  public List<Employee> getAll(int shopId) {
    QueryWrapper<Employee> queryWrapper = new QueryWrapper<>();

    queryWrapper.eq("fk_shop_id", shopId);

    List<Employee> list = employeeMapper.selectList(queryWrapper);

    return list;
  }
}
